package com.wanxi.education.mapper;

import com.wanxi.education.model.pojo.Permission;
import com.wanxi.education.model.vo.user.PermissionVO;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;
import java.util.Set;

/**
 * @Author: Kang
 * @Date: 2021/9/27 9:35
 * @Description: 权限持久层
 * @Version: 1.0
 */
public interface PermissionMapper {

    Set<PermissionVO> findByRoleId(@Param("roldIds") Set<Long> roldIds);

    List<PermissionVO> findPage();

    int add(Permission permission);

    PermissionVO findByPermissionId(@Param("permissionId") Long permissionId);

    int updateById(Permission permission);

    int deleteByPermissionId(@Param("permissionId") Long permissionId);

    @Select("select * from permission")
    List<PermissionVO> findAll();

}
